const handler = {
  get(target, name) {
    if (name === "prototype") return Object.prototype;
    return "Hello," + name;
  },
  apply(target, thisBinding, args) {
    return args[0];
  },
  construct(target, args) {
    return { value: args[1] };
  },
};

const fproxy = new Proxy(function (x, y) {
  return x + y;
}, handler);
function foo() {}

console.log(fproxy(7, 8)); // 7
console.log(new fproxy(7, 8)); // {value: 8}
console.log(fproxy.prototype === Object.prototype); // true
console.log(foo.prototype === Object.prototype); // false
console.log(fproxy.bar); // Hello,bar
